package com.lingnan.feign;

import com.lingnan.entity.dto.InterviewInvitationRequest;
import com.lingnan.entity.dto.ResumeStatusRequest;
import com.lingnan.entity.vo.Result;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "notification-service", path = "/notification")
public interface NotificationFeignClient {
    /**
     * 发送面试邀请通知
     */
    @PostMapping("/interview-invitation")
    public Result<Void> sendInterviewInvitation(@RequestBody @Valid InterviewInvitationRequest request);

    /**
     * 发送简历状态通知
     */
    @PostMapping("/resume-status")
    public Result<Void> sendResumeStatusNotification(@RequestBody @Valid ResumeStatusRequest request);

    /**
     * 发送个人通知
     */
    @PostMapping("/send-personal")
    public Result<Void> sendPersonalNotification(
            @RequestParam("senderId") Long senderId,
            @RequestParam("receiverId") Long receiverId,
            @RequestParam("title") String title,
            @RequestParam("content") String content,
            @RequestParam(value = "type",defaultValue = "0") Integer type);
}
